<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
</head>
<body>
    <h3>后台管理界面</h3>
    <p>
        欢迎您：<span id="username"></span>
    </p>

    <script>
        $(function(){
            // 获取用户信息
            var userInfo = JSON.parse(localStorage.getItem('userInfo'))
            $('#username').text(userInfo.username)

            // 异步获取学生信息
            $.ajax({
                type:'get',
                url:'http://localhost:8080/students',
                data:{
                    pageNum:1,
                    pageSize:10
                },
                dataType:'json',
                headers:{
                    'Authorization': userInfo.token
                },
                success:function(res){
                    console.log(res)
                }
            })
            
        })
    </script>
</body>
</html>